package cn.hn.comm.exception.impl;

import java.util.HashMap;
import java.util.Map;

import cn.hn.comm.exception.IExceptionService;
import cn.hn.comm.ibatis.BaseDAO;

public class ExceptionServiceImpl implements IExceptionService {

	final String NAMESPACE = "cn.hn.comm.exception.dao";

	// DAO基类
	private BaseDAO baseDAO;

	public Integer insertException(String className, String method,
			String exception) {
		Map params = new HashMap<String, Object>();
		params.put("CLASS", className);
		params.put("METHOD", method);
		params.put("EXCEPTION", exception);
		Object obj = baseDAO.insert(NAMESPACE, "insertException", params);
		if (obj != null) {
			return (Integer) obj;
		}
		 return null;
	}

	public BaseDAO getBaseDAO() {
		return baseDAO;
	}

	public void setBaseDAO(BaseDAO baseDAO) {
		this.baseDAO = baseDAO;
	}

}
